﻿#ifndef MOVEJOINT_H
#define MOVEJOINT_H

#include <QObject>
#include <QDebug>
#include "operation.h"
//#include "description.h"

class MoveJoint : public Operation
{
    Q_OBJECT
public:
    explicit MoveJoint(QObject *parent = nullptr);
    ~MoveJoint();

public:
    virtual void run() override;

    float               GetVelocity(){return m_dblVelocity;}
    float               GetAcceleration(){return m_dblAcceleration;}
    void                SetVeloctiy(float value){m_dblVelocity = value;}
    void                SetAcceleration(float value){m_dblAcceleration = value;}

private:
    QList<double>       m_dblJointAngles;

    //                  后增加的
    float               m_dblVelocity; // 机械臂的运行速度
    float               m_dblAcceleration; // 机械臂的加速度

private:
    //Description*        m_pDescription;

public:
    virtual void writeXML(QXmlStreamWriter& writer) override;
    virtual void readFromXML(QXmlStreamReader& reader) override;
    virtual QString getClassName() override;


    QList<double>& dblJointAngles();
    void setDblJointAngles(const QList<double> &newDblJointAngles);
};

#endif // MOVEJOINT_H
